package com.yhb.channel.dao.ANYPAY;

import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AnyPayChannelBoundRelationshipMapper {
    int insert(
            @Param("record") AnyPayChannelBoundRelationshipRecord record
    );

    String selectBillingCardIdByUserId(
            @Param("userId") String userId
    );

    AnyPayChannelBoundRelationshipRecord getBillingCardRecordByUserId(
            @Param("userId") String userId
    );

    AnyPayChannelBoundRelationshipRecord getRecordByCardId(
            @Param("cardId") String cardId
    );

    // 根据userId修改结算卡信息
    int updateByUserId(
            @Param("record") AnyPayChannelBoundRelationshipRecord record
    );

    int updateByCardId(
            @Param("record") AnyPayChannelBoundRelationshipRecord record
    );

    List<AnyPayChannelBoundRelationshipRecord> getAllRecordByUserId(
            @Param("userId") String userId
    );
}
